Skip to content

feat: add static base image build for Tekton Go binaries#3221

Open
waveywaves wants to merge 1 commit intotektoncd:mainfrom
waveywaves:feat/static-base-image
Open

feat: add static base image build for Tekton Go binaries#3221
waveywaves wants to merge 1 commit intotektoncd:mainfrom
waveywaves:feat/static-base-image

Conversation

@waveywaves
Copy link
Member

@waveywaves waveywaves commented Mar 15, 2026

Changes

Add apko-based build for a multi-arch static base image supporting amd64, arm64, s390x, and ppc64le.

Why: All Tekton repos currently depend on cgr.dev/chainguard/static which is pinned to an EOL Alpine 3.18 digest from Nov 2023. The Chainguard free tier dropped s390x/ppc64le support, so bumping the digest breaks release builds. Building our own image gives us control over architecture coverage and update cadence.

What this adds:

  • images/static-base/apko.yaml — declarative image definition, builds a ~300KB static base per arch with CA certs, timezone data, and nonroot user
  • .github/workflows/build-static-base-image.yaml — weekly CI to rebuild and publish to ghcr.io/tektoncd/plumbing/static-base
  • images/static-base/README.md — documents contents, build instructions, and consumers

Consumers: tektoncd/pipeline, tektoncd/triggers, tektoncd/chains, tektoncd/results — all can reference ghcr.io/tektoncd/plumbing/static-base as their defaultBaseImage in .ko.yaml.

Related: tektoncd/pipeline#9557

/kind feature

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

Add apko-based build for a multi-arch static base image supporting
amd64, arm64, s390x, and ppc64le. This replaces the dependency on
cgr.dev/chainguard/static which is pinned to an EOL Alpine 3.18
digest and whose free tier dropped s390x/ppc64le support.

The image contains CA certificates, timezone data, nsswitch.conf,
and a nonroot user (UID 65532). A weekly GitHub Actions workflow
rebuilds and publishes to ghcr.io/tektoncd/plumbing/static-base.

All Tekton repos (pipeline, triggers, chains, results) can reference
this as their defaultBaseImage in .ko.yaml.

Related: tektoncd/pipeline#9557
@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 15, 2026
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign anithapriyanatarajan after the PR has been reviewed.
You can assign the PR to them by writing /assign @anithapriyanatarajan in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 15, 2026
waveywaves added a commit to waveywaves/tekton-pipeline that referenced this pull request Mar 15, 2026
The apko build and CI workflow belong in tektoncd/plumbing since all
Tekton repos need the same base image. Update .ko.yaml and publish.yaml
to reference ghcr.io/tektoncd/plumbing/static-base instead.

See: tektoncd/plumbing#3221
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, other images that we build here are in tekton/images, we should probably keep them at the same place, or at least share the same "parent".

Either we have a tekton/images/apko or tekton/apko-images, or we could make the paths detection a bit smarter in the workflows.

Also, to "respect" the CI summary, we should update ci.yaml instead of creating a new workflow (or have ci.yaml call that workflow).

@@ -0,0 +1,27 @@
contents:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As highlighted in tektoncd/pipeline#9557, we should probably use keyring (to validate the repositories and packages)

build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Copy link
Contributor

@anithapriyanatarajan anithapriyanatarajan Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a policy of pinning actions and any dependencies across tektoncd org projects to SHAs (Refer: https://github.com/tektoncd/pipeline/blob/main/.github/workflows/codeql-analysis.yml#L57). Could you fix this?

@anithapriyanatarajan
Copy link
Contributor

@waveywaves - Could you consider absorbing any good practices from #1735 into this PR? I hope we can close #1735 once this PR merges. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants